<?php

class Page extends MY_Controller {

	function Page()
	{
		parent::MY_Controller();
		$this->load->model('Page_model');
	}
	
	function index(){
		// Send and Load page
		$data['page'] = '';
		$this->load->vars($data);
		$this->load->view('template_view');	
	}

	function detailProfile($id)
	{	
		// Set meta
		$title = $this->data['site']['site_title'];
		$data['web_title'] = "SipDev | Profile";
		$data['meta_title'] = $title.", ".$data['web_title'];
		$data['meta_description'] = purify($this->data['site']['site_description']);
		$data['meta_keyword'] = $this->data['site']['site_keyword'];
		
		 // Get Profile Record
		$data['profile'] = $this->Page_model->get_rows_join('*','page_item.page_id',$id)->result_array();
		
		
		// Send and Load page
		$data['page'] = 'profile_view';
		$this->load->vars($data);
		$this->load->view('template_view');	
	}
	
	function listService($id)
	{	
		// Set meta
		$title = $this->data['site']['site_title'];
		$data['web_title'] = "SipDev | Service";
		$data['meta_title'] = $title.", ".$data['web_title'];
		$data['meta_description'] = purify($this->data['site']['site_description']);
		$data['meta_keyword'] = $this->data['site']['site_keyword'].', service';
		
		 // Get Service Record
		$data['service'] = $this->Page_model->get_rows_join('*','page_item.page_id',$id)->result_array();
		
		
		// Send and Load page
		$data['page'] = 'service_view';
		$this->load->vars($data);
		$this->load->view('template_view');	
	}
	
	
	function detailService($id)
	{	
		
		 // Get Detail Service Record
		$data['row_page'] = $this->Page_model->get_row_page_item('*','id',$id)->row_array();
		
		// Set meta
		$title = $this->data['site']['site_title'];
		$data['web_title'] = "SipDev | Service | ". $data['row_page']['title'];
		$data['meta_title'] = $title.", ".$data['web_title'];
		$data['meta_description'] = purify($data['row_page']['description']);
		$data['meta_keyword'] = $this->data['site']['site_keyword'].','.$data['row_page']['title'];
		
		// Send and Load page
		$data['page'] = 'servicedetail_view';
		$this->load->vars($data);
		$this->load->view('template_view');	
	}
	
	
}	

/* End of file page.php */
/* Location: ./application/controllers/page.php */
?>